It is known practice to produce electronic packages that comprise electronic chips mounted on substrate wafers and encapsulation covers for the chips, which covers are mounted on the substrate wafers. These encapsulation covers comprise prefabricated cover bodies that have through-passages and shoulders around these passages and are provided with optical elements allowing light to pass through, which are generally made of glass and are added to the shoulders and attached by means of layers of adhesive. It is therefore the distance between the shoulders and the electronic chips that determines the distance between the optical elements and the electronic chips.